<template>
	<view>
		<view class="header status_bar" :class="scrrol == true ? 'scrrolHeader' : ''">
			<view class="back iconfont icon-xiangzuo1" @tap="backPage"></view>
			<view class="text" :class="scrrol == true ? 'scrrolHeader' : ''">朋友圈车源同步</view>
		</view>	
		<view class="clear_box"></view>
		<view class="bg_box">
			<image class="bg01" :src="bg20" mode="widthFix"></image>
		</view>
		
		<view class="confirm02" @tap="closePupu">
			<view class="text">
				<view class="t01">立即申请</view>
				<view class="t02">每天自动同步朋友圈车源</view>
			</view>
		</view>
		
		<!-- 弹窗 -->
		<view class="pupu_box" @tap="closePupu" v-if="pupu">
			<view class="pupu_show" @tap.stop="">
				<view class="pupu_title">添加客服</view>
				<view class="pupu_title">免费开启朋友圈同步</view>
				<view class="close iconfont icon-guanbi1" @tap="closePupu"></view>
				<view class="pupu_value">
					<view class="ewm">
						<image :src="image" mode="widthFix" show-menu-by-longpress="true"></image>
					</view>
					<view class="pupu_menu" @tap="closePupu">长按二维码添加客服</view>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pupu:false,
				page:1,
				scrrol:false,
				image:'',
				bg20:'',
				
			}
		},
		onLoad() {
			this.loadData();
		},
		methods: {
			closePupu(){
				let that = this;
				that.pupu = !that.pupu;
			},
			setRule(e){
				let that = this;
				let index = e.currentTarget.dataset.index;
				that.flowList[index].tick = !that.flowList[index].tick
			},
			loadData() {
				let that = this;
				that.Net._get('other/setting_info', {}, res => {
					if (res.code == 1) {
						that.image = res.data.service_image;
						that.bg20 = res.data.bg20;
					}
				});
			},
			backPage() {
				uni.navigateBack({});
			},
			gotopage(e) {
				let url = e.currentTarget.dataset.url;
				uni.navigateTo({
					url: url
				});
			},

		},
		onPageScroll: function(Object) {
			//console.log(Object.scrollTop); //实时获取到滚动的值
			if (Object.scrollTop > 28) {
				this.scrrol = true;
				/* #ifdef APP-PLUS */
				/* #endif */
			} else if (Object.scrollTop < 28) {
				this.scrrol = false;
				/* #ifdef APP-PLUS */
				/* #endif */
			}
		},
		onReachBottom() {
		  var that = this;
		  that.page++;
		  // that.Net._get('shop_goods', {per_page:'10',page:that.page,}, res => {
		  //   if (res.code == 200) {
		  //     //console.log(res)
		  //     if (res.data.data == '') {
		  //       uni.showToast({
		  //         title: '已经是最后一页了',
		  //         duration: 2000,
		  //         icon: 'none'
		  //       });
		  //     } else {
		  //       that.info = that.info.concat(res.data.data); //将数据拼接在一起
		  //     }
		  //   } else if (res.code == 0) {
		  //     that.Msg.Success(res.msg, res => {});
		  //   }
		  // });
		},
	}
</script>

<style>
	
	.header{
		background-color: transparent !important;
		height: 18vw !important;
	}
	
	.header .text{
		background-color: transparent !important;
		color: #333 !important;
	}
	
	.header .back{
		color: #333 !important;
	}
	
	.scrrolHeader{
		background-color: #F9E9E3 !important;
	}
	
	.bg_box{
		width: 100%;
		position: relative;
	}
	
	.bg_box .bg01{
		width: 100%;
	}
	
	.bg_box .bg_content{
		width: 92%;
		position: absolute;
		left: calc(50% - 46%);
		top: calc(13.5vw + var(--status-bar-height));
		z-index: 98;
	}
	
	.confirm02{
		height: 15vw;
		border-radius: 3vw;
		background: linear-gradient(to right, #FE9229, #FF4F27);
		margin-top: 4vw;
	}
	
	.confirm02 .t01{
		text-align: center;
	}
	
	.confirm02 .t02{
		text-align: center;
		font-size: 3vw;
	}
	
	.pupu_box {
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.7);
		position: fixed;
		left: 0;
		top: 0;
		z-index: 9999;
		display: flex;
		justify-content: center;
		align-items: flex-end;
	}
	
	.pupu_box .pupu_show {
		width: 100%;
		background-color: #fff;
		border-radius: 4vw 4vw 0 0;
		padding: 5vw 4vw;
		position: relative;
	}
	
	.pupu_box .pupu_show .pupu_title{
		font-size: 4.5vw;
		color: #f3aa40;
		text-align: center;
		font-weight: bold;
		padding-bottom: 2vw;
	}
	
	.pupu_box .pupu_show .close{
		font-size: 4vw;
		color: #333;
		text-align: center;
		position: absolute;
		right: 5vw;
		top: 5vw;
	}
	
	.pupu_box .pupu_show .pupu_value{
		max-height: 70vh;
		width: 100%;
		overflow-x: hidden;
		overflow-y: scroll;
		
	}
	
	.pupu_box .pupu_show .pupu_value .ewm{
		width: 30vw;
		height: 30vw;
		margin: 0 auto;
	}
	
	.pupu_box .pupu_show .pupu_value .ewm image{
		width: 100%;
		height: 100%;
	}
	
	.pupu_menu{
		width: 100%;
		height: 13vw;
		border-radius: 13vw;
		line-height: 13vw;
		text-align: center;
		background-color: #FC5D20;
		color: #fff;
		font-size: 4.6vw;
		margin: 0 auto;
		margin-top: 8vw;
		font-weight: bold;
	}
	
	
	
	
</style>
